Optimal. Leaf size=103 \[ -\frac {b^2 d n^2}{4 x^2}-\frac {2 b^2 e n^2}{x}-\frac {b d n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {2 b e n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{x} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.10, antiderivative size = 103, normalized size of antiderivative = 1.00, number of steps
used = 6, number of rules used = 3, integrand size = 21, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.143, Rules used = {2395, 2342,
2341} \begin {gather*} -\frac {b d n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {2 b e n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{x}-\frac {b^2 d n^2}{4 x^2}-\frac {2 b^2 e n^2}{x} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 2341
Rule 2342
Rule 2395
Rubi steps
\begin {align*} \int \frac {(d+e x) \left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx &=\int \left (\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{x^3}+\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{x^2}\right ) \, dx\\ &=d \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^3} \, dx+e \int \frac {\left (a+b \log \left (c x^n\right )\right )^2}{x^2} \, dx\\ &=-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{x}+(b d n) \int \frac {a+b \log \left (c x^n\right )}{x^3} \, dx+(2 b e n) \int \frac {a+b \log \left (c x^n\right )}{x^2} \, dx\\ &=-\frac {b^2 d n^2}{4 x^2}-\frac {2 b^2 e n^2}{x}-\frac {b d n \left (a+b \log \left (c x^n\right )\right )}{2 x^2}-\frac {2 b e n \left (a+b \log \left (c x^n\right )\right )}{x}-\frac {d \left (a+b \log \left (c x^n\right )\right )^2}{2 x^2}-\frac {e \left (a+b \log \left (c x^n\right )\right )^2}{x}\\ \end {align*}
________________________________________________________________________________________
Mathematica [A]
time = 0.03, size = 90, normalized size = 0.87 \begin {gather*} -\frac {2 a^2 (d+2 e x)+2 a b n (d+4 e x)+b^2 n^2 (d+8 e x)+2 b (2 a (d+2 e x)+b n (d+4 e x)) \log \left (c x^n\right )+2 b^2 (d+2 e x) \log ^2\left (c x^n\right )}{4 x^2} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [C] Result contains higher order function than in optimal. Order 9 vs. order
3.
time = 0.11, size = 1483, normalized size = 14.40
method | result | size |
risch | \(\text {Expression too large to display}\) | \(1483\) |
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A]
time = 0.28, size = 155, normalized size = 1.50 \begin {gather*} -\frac {1}{4} \, b^{2} d {\left (\frac {n^{2}}{x^{2}} + \frac {2 \, n \log \left (c x^{n}\right )}{x^{2}}\right )} - 2 \, b^{2} {\left (\frac {n^{2}}{x} + \frac {n \log \left (c x^{n}\right )}{x}\right )} e - \frac {b^{2} e \log \left (c x^{n}\right )^{2}}{x} - \frac {2 \, a b n e}{x} - \frac {2 \, a b e \log \left (c x^{n}\right )}{x} - \frac {b^{2} d \log \left (c x^{n}\right )^{2}}{2 \, x^{2}} - \frac {a b d n}{2 \, x^{2}} - \frac {a^{2} e}{x} - \frac {a b d \log \left (c x^{n}\right )}{x^{2}} - \frac {a^{2} d}{2 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A]
time = 0.41, size = 180, normalized size = 1.75 \begin {gather*} -\frac {b^{2} d n^{2} + 2 \, a b d n + 2 \, a^{2} d + 4 \, {\left (2 \, b^{2} n^{2} + 2 \, a b n + a^{2}\right )} x e + 2 \, {\left (2 \, b^{2} x e + b^{2} d\right )} \log \left (c\right )^{2} + 2 \, {\left (2 \, b^{2} n^{2} x e + b^{2} d n^{2}\right )} \log \left (x\right )^{2} + 2 \, {\left (b^{2} d n + 2 \, a b d + 4 \, {\left (b^{2} n + a b\right )} x e\right )} \log \left (c\right ) + 2 \, {\left (b^{2} d n^{2} + 2 \, a b d n + 4 \, {\left (b^{2} n^{2} + a b n\right )} x e + 2 \, {\left (2 \, b^{2} n x e + b^{2} d n\right )} \log \left (c\right )\right )} \log \left (x\right )}{4 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [A]
time = 0.29, size = 165, normalized size = 1.60 \begin {gather*} - \frac {a^{2} d}{2 x^{2}} - \frac {a^{2} e}{x} - \frac {a b d n}{2 x^{2}} - \frac {a b d \log {\left (c x^{n} \right )}}{x^{2}} - \frac {2 a b e n}{x} - \frac {2 a b e \log {\left (c x^{n} \right )}}{x} - \frac {b^{2} d n^{2}}{4 x^{2}} - \frac {b^{2} d n \log {\left (c x^{n} \right )}}{2 x^{2}} - \frac {b^{2} d \log {\left (c x^{n} \right )}^{2}}{2 x^{2}} - \frac {2 b^{2} e n^{2}}{x} - \frac {2 b^{2} e n \log {\left (c x^{n} \right )}}{x} - \frac {b^{2} e \log {\left (c x^{n} \right )}^{2}}{x} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [B] Leaf count of result is larger than twice the leaf count of optimal. 205 vs.
\(2 (100) = 200\).
time = 2.49, size = 205, normalized size = 1.99 \begin {gather*} -\frac {4 \, b^{2} n^{2} x e \log \left (x\right )^{2} + 8 \, b^{2} n^{2} x e \log \left (x\right ) + 8 \, b^{2} n x e \log \left (c\right ) \log \left (x\right ) + 2 \, b^{2} d n^{2} \log \left (x\right )^{2} + 8 \, b^{2} n^{2} x e + 8 \, b^{2} n x e \log \left (c\right ) + 4 \, b^{2} x e \log \left (c\right )^{2} + 2 \, b^{2} d n^{2} \log \left (x\right ) + 8 \, a b n x e \log \left (x\right ) + 4 \, b^{2} d n \log \left (c\right ) \log \left (x\right ) + b^{2} d n^{2} + 8 \, a b n x e + 2 \, b^{2} d n \log \left (c\right ) + 8 \, a b x e \log \left (c\right ) + 2 \, b^{2} d \log \left (c\right )^{2} + 4 \, a b d n \log \left (x\right ) + 2 \, a b d n + 4 \, a^{2} x e + 4 \, a b d \log \left (c\right ) + 2 \, a^{2} d}{4 \, x^{2}} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [B]
time = 3.54, size = 109, normalized size = 1.06 \begin {gather*} -\frac {x\,\left (2\,e\,a^2+4\,e\,a\,b\,n+4\,e\,b^2\,n^2\right )+a^2\,d+\frac {b^2\,d\,n^2}{2}+a\,b\,d\,n}{2\,x^2}-\frac {\ln \left (c\,x^n\right )\,\left (\frac {b\,d\,\left (2\,a+b\,n\right )}{2}+2\,b\,e\,x\,\left (a+b\,n\right )\right )}{x^2}-\frac {{\ln \left (c\,x^n\right )}^2\,\left (\frac {b^2\,d}{2}+b^2\,e\,x\right )}{x^2} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________